Some flat panel and tablet computer displays can be physically rotated to display information in either landscape or portrait mode. Typical display drivers implement landscape mode by rendering data to a “landscape oriented” memory layout or “drawing surface” allocated in memory so that the pixels in each row of the drawing surface are stored on the same page or row in memory. This drawing surface permits display engines to fetch pixels from memory row-wise while incurring page misses only when switching between rows.
Because landscape mode is more traditional in displays, conventional display hardware expects to receive pixel data streamed to it in a sequence of rows of pixels conforming to the landscape oriented drawing surface even when the display is physically oriented in portrait mode. Thus, if a driver implements portrait mode by rendering to a “portrait oriented” drawing surface that places pixels in each row on the same page of memory, the display engine will incur a page miss with each pixel because the display hardware is still expecting the pixel data to be streamed from a landscape oriented drawing surface.
Common solutions to portrait mode rendering rely on either providing dual drawing surfaces in memory, one portrait oriented surface for the driver to render to and a rotated, landscape oriented surface accessed by the display engine, or by enhancing the display engine with line buffers. But creating dual drawing surfaces doubles the memory requirements of the display buffer and consumes memory bandwidth with the copy operation used to create the second, rotated surface. Alternatively, adding hardware line buffers to the display engine path incurs substantial hardware implementation costs.